Skip to content

feat(shell): re-apply VR reference-space offset on SceneRack hops (#283) - #284

Merged
bradleypmartin merged 1 commit into
mainfrom
283-vr-reoffset-on-scenerack-hops
May 30, 2026
Merged

feat(shell): re-apply VR reference-space offset on SceneRack hops (#283)#284
bradleypmartin merged 1 commit into
mainfrom
283-vr-reoffset-on-scenerack-hops

Conversation

@bradleypmartin

@bradleypmartin bradleypmartin commented May 30, 2026

Copy link
Copy Markdown
Contributor

Closes #283

Summary

Extends the per-scene VR spawn behavior from #263 to also fire on in-session SceneRack hops, not just on sessionstart. Pre-diff, hopping quadrics → tangent-planes mid-VR-session stranded the user at world Z ≈ +1.5 while the new plinth sat at Z = -2.125 — a measured ~3.6 m gap instead of the intended ~1.45 m (Brad's #282 smoke verdict). Lifts applyVRSpawnOffsetForExhibit out of the VR-branch closure into a mode-independent let slot the VR branch populates; switchExhibitNow calls it after the mount + per-scene rack/camera writes. Stacking-safe by construction — the helper always derives from the unoffset baseXRReferenceSpace snapshot, so N consecutive hops collapse to a single per-scene offset rather than a sum.

Test plan

Automated:

  • npx tsc --noEmit clean
  • npm run lint clean
  • npm test — 604/604 pass
  • /spar (Sonnet oppositional review): PUSH, zero findings — stacking, boot-mount isPresenting no-op, pancake-mode null hook, sessionstart double-application, disposers, and HMR-generation scoping all verified.

Headset smoke on the Cloudflare PR preview (Quest 3S):

  • Enter VR on quadrics — user-to-plinth-front distance reads ~1.45 m (regression check vs. feat(staging): per-scene plinth + spawn derivation from cutout (#263) #282).
  • In-session hop quadrics → tangent-planes — distance reads ~1.45 m to the new plinth (not ~3.6 m).
  • In-session hop quadrics → gradient-levels — ~1.45 m.
  • In-session hop quadrics → saddle-extrema — ~1.45 m.
  • Reverse hops (tangent-planes → quadrics, gradient-levels → quadrics, saddle-extrema → quadrics) — ~1.45 m to the new plinth.
  • Multi-hop chain (e.g. quadrics → tangent-planes → gradient-levels → saddle-extrema → quadrics) — no offset stacking; each step lands at ~1.45 m.
  • Mid-VR-teleport read: the rack + plinth already rearrange under the user on every hop today (shipped in feat(staging): per-scene plinth + spawn derivation from cutout (#263) #282); confirm bringing the user along keeps the rearrangement consistent rather than disorienting.

Pancake regression check (preview URL or npm run dev):

  • Pancake SceneRack hops continue to reposition the camera per-scene with no VR-path interference (call site is ?. no-op when applyVRSpawnOffsetForExhibit is null).

🤖 Generated with Claude Code

In-session VR scene-rack hops were stuck at the prior session's
spawn offset, leaving the user ~3.6 m from the new plinth instead
of the intended ~1.45 m. Lift `applyVRSpawnOffsetForExhibit` out
of the VR-branch closure and call it from `switchExhibitNow` so
every cluster hop re-derives the per-scene offset against the
stored unoffset reference-space snapshot. Stacking-safe by
construction; pancake-mode call site is a `?.` no-op.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Preview deploy ready — commit 63fb63827d6824121bf3d1e8260fcb80ebc3053a

https://geometer-pr-284.1bradley-martin1.workers.dev

Open this URL in the Quest browser to smoke-test in headset.

@bradleypmartin
bradleypmartin merged commit ce4d5df into main May 30, 2026
3 checks passed
@bradleypmartin
bradleypmartin deleted the 283-vr-reoffset-on-scenerack-hops branch May 30, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(shell): re-apply VR reference-space offset on SceneRack in-session hops (#263 follow-up)

1 participant